﻿@import "../../core/less/import.less";
@import "maker.less";
@btn-pre: ~"@{ui}-btn";

.hover {
    &:hover, &.@{btn-pre}-hover {
        color: @color-primary;
        border-color: @color-primary;
        background-color: @color-background;
        z-index: 1;
    }
}
//btn default
.@{btn-pre} {
    display: inline-block;
    line-height: 1.5;
    margin-bottom: 0;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    padding: 6px 15px;
    font-size: 12px;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    color: @color-text-normal;
    background-color: @color-background-normal;
    border: 1px solid @color-border-normal;
    outline: none;
    .transition(all @animate-time-fast+0.1 cubic-bezier(0.645, 0.045, 0.355, 1));
    .hover;

    &-info {
        .message-btn(@color-info);
    }

    &-success {
        .message-btn(@color-success);
    }

    &-warning {
        .message-btn(@color-warning);
    }

    &-error {
        .message-btn(@color-error);
    }
}

.@{btn-pre}.disabled, .@{btn-pre}.disabled:hover, button[disabled], button[disabled]:hover {
    cursor: default;
    background-color: @color-background-normal;
    border-color: @color-background-normal;
    color: @color-disabled;
}

.@{btn-pre}-primary {
    background-color: @color-primary;
    color: @color;
    border-color: @color-primary;

    &:hover, &.@{btn-pre}-hover {
        color: @color;
        border-color: @color-normal;
        background-color: @color-normal;
        z-index: 1;
    }
}

.@{btn-pre}-ghost {
    background-color: @color-background;
    border-color: @color-ghost;
    .hover;
}

.@{btn-pre}-large {
    font-size: 14px;
    padding: 8px 23px;
}

.@{btn-pre}-small {
    padding: 2px 8px;
}

.@{btn-pre}-group {
    position: relative;
    display: inline-block;

    > .@{btn-pre}:last-child:not(:first-child) {
        border-bottom-left-radius: 0;
        border-top-left-radius: 0;
        margin: 0 0 0 -1px;
    }

    > .@{btn-pre}:first-child:not(:last-child) {
        border-bottom-right-radius: 0;
        border-top-right-radius: 0;
        margin: 0;
    }

    .@{btn-pre}:not(:first-child):not(:last-child) {
        border-radius: 0;
        margin: 0 0 0 -1px;
    }

    .@{btn-pre}-primary:first-child:not(:last-child) {
        border-right-color: @color-normal;
    }

    .@{btn-pre}-primary:last-child:not(:first-child), .@{btn-pre}-group .@{btn-pre}-primary + .@{btn-pre} {
        border-left-color: @color-normal;
    }
}
